package cn.bdqn.service.impl;


import cn.bdqn.mapper.GoodSMapper;
import cn.bdqn.pojo.Goods;
import cn.bdqn.service.GoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsServiceImpl extends ServiceImpl<GoodSMapper,Goods> implements GoodsService {

    @Resource
    private GoodSMapper goodSMapper;

    /**
     * 导出
     */
    @Override
    public List<Goods> exportExcel() {
        return goodSMapper.selectList(null);
    }

    /**
     * 导入
     */
    public void importExcel(List<Goods> goods) {
        //批量添加
        saveBatch(goods);
    }

}

